In development of software for an embedded apparatus in recent years, in order to early start software debugging, a software simulator to simulate operations of a microcomputer on which the software is running and a peripheral device of the microcomputer is used. The use of this simulator allows the software debugging to be performed before a test environment for hardware on which the software is actually running is completed.
The software simulator may perform a graphic display of a state of the peripheral device or a state of the input/output terminal of the microcomputer. To take example, the software simulator performs the graphic display of turning on and off of an LED, as respective states of the peripheral device. Alternatively, the software simulator performs the graphic display of a signal value of a signal input to or output from the input/output terminal, as the state of the input/output terminal.
Thus, a user may visually recognize, by a graphic, a situation where each state of the peripheral device or the state of the input/output terminal of the microcomputer changes during execution of simulation by the software simulator.
Patent Literature 1 discloses a simulator as mentioned above. The simulator disclosed in Patent Literature 1 operates as follows.
The simulator records an occurrence time at which a change in a state has occurred during execution of simulation and an updated value being a state value after the change, as trace data.
After the simulation, the simulator converts the occurrence time of the trace data to a reproduction display time at which the state change is to be reproduced and displayed.
Then, the simulator reads the trace data and displays the state change by a graphic, at the reproduction display time.
With this arrangement, the simulator may reproduce the state change, using the trace data, without execution of simulation again.
Further, the simulator converts the occurrence time to the reproduction display time using a speed ratio of a time-lapse speed during the reproduction to a time-lapse speed during the simulation, thereby allowing change of a speed of reproducing the state change. To take an example, the simulator may reproduce the state change at high speed.
The conventional simulator, however, cannot reproduce the state change in the reverse order of lapse of time. Therefore, the conventional simulator is inconvenient in the following respects.
When a wrong operation occurs during simulation, a user desires to identify a change in a state while tracing back to the past from a point of time when he has noticed the wrong operation, in order to find the cause of the wrong operation.
The conventional simulator, however, cannot reproduce the state change in the reverse order of lapse of time. Thus, the user must find the cause of the wrong operation while identifying, from a starting point of time of the simulation, the state change in the order of lapse of time. As a result, it will take time to find the cause of the wrong operation.
Further, the conventional simulator cannot change a speed of reproducing the state change, during the course of the reproduction of the state change.
Therefore, the user may overlook the state change if the speed of the reproduction is fast, and it will take time to identify the state change if the speed of the reproduction is slow.
To take an example, when a LED blinks at high speed during reproduction, the user desires to increase a blinking time interval of the LED in order to ensure a period of visual recognition. However, since the conventional simulator cannot change the speed of reproduction during the reproduction, the blinking time interval of the LED cannot be increased. When a turn-on state of the LED during the reproduction does not change, the user desires to reduce a display continuation period of the LED whose turn-on state remains unchanged, in order to enhance efficiency of the recognition work. However, since the conventional simulator cannot change the speed of reproduction during the reproduction, the display continuation period of the LED whose turn-on state remains unchanged cannot be reduced.